package com.jie.demo.mock;
// 静态导入会使代码更简洁
import org.junit.Test;

import java.util.List;

import static org.mockito.Mockito.*;

public class BaseMock {

    @Test
    public void test(){
        // mock creation 创建mock对象
        List mockedList = mock(List.class);

        //using mock object 使用mock对象
        //mockedList.add("one");
        mockedList.clear();
        //verification 验证
        verify(mockedList).add("one");
        verify(mockedList).clear();
    }
}
